#include <iostream>

using namespace std;

class draw{
private:
    int i;
    int k;
    int p;
    int q;
    int m;
public:

    draw(int i):i(i){}
    void Tri(){
        for(int p = 1; p <= i; p++){
            for(int q = 1; q <= p; q++){
            printf("*");
            if(q == p)
                printf("\n");
            }
        }
    }

    int Square(){
        for(int p = 1; p <= i; p++){
            for (int q = 1; q <= i; q++){
                printf("*");
                if (q == i)
                    printf("\n");
            }
            q = 1;
        }
    }

    void Parall(){
        for(int m = 1; m <= i; m++){
            if(m > 1){
                for(int q = 1; q <= m-1; q++)
                    printf(" ");
            }
            for (int k = 1; k <= i; k++){
                printf("*");
                if (k == i)
                    printf("\n");
            }
            k = 1;
            q = 1;
        }
    }

    void Rect(){
        for(int m = 1; m <= i + 5; m++){
            for (int k = 1; k <= i - 1; k++){
                printf("*");
                if (k == i-1)
                    printf("\n");
            }
            k = 1;
    }
    }
};

int main()
{
    draw dwg1(4);
    draw dwg2(6);
    draw dwg3(5);
    draw dwg4(8);

    dwg1.Tri();
    cout << endl;
    dwg2.Square();
    cout << endl;
    dwg3.Parall();
    cout << endl;
    dwg4.Rect();

    return 0;
}
